<div class="dux-page-header am-cf">
    <div class="page-title">
        <a class="am-btn am-btn-primary" href="{url('index')}"> 订单列表</a>
    </div>
    <div class="page-action">
        <!--if{$status.pay}-->
        <button class="am-btn am-btn-primary"
                data-dux="dialog-open"
                data-url="{url('order/Order/pay', ['order_id' => $info.order_id])}" data-title="确认付款"
                data-height="370px">
            <!--{else}-->
            <button class="am-btn am-btn-primary" disabled>
                <!--{/if}-->
                确认付款
            </button>


            <!--if{$status.parcel}-->
            <button class="am-btn am-btn-primary"
                    data-dux="dialog-open"
                    data-url="{url('order/Order/parcel', ['order_id' => $info.order_id])}" data-title="订单配货"
                    data-height="235px">
                <!--{else}-->
                <button class="am-btn am-btn-primary" disabled>
                    <!--{/if}-->
                    订单配货
                </button>



            <!--if{$status.delivery}-->
            <button class="am-btn am-btn-primary"
                    data-dux="dialog-open"
                    data-url="{url('order/Order/delivery', ['order_id' => $info.order_id])}" data-title="订单发货"
                    data-width="800px"
                    data-height="450px">
                <!--{else}-->
                <button class="am-btn am-btn-primary" disabled>
                    <!--{/if}-->
                    订单发货
                </button>
                <!--if{$status.complete}-->
                <button class="am-btn am-btn-primary"
                        data-dux="dialog-open"
                        data-url="{url('order/Order/complete', ['order_id' => $info.order_id])}" data-title="完成订单"
                        data-height="235px">
                    <!--{else}-->
                    <button class="am-btn am-btn-primary" disabled>
                        <!--{/if}-->
                        完成订单
                    </button>
                    <!--if{$status.close}-->
                    <button class="am-btn am-btn-primary"
                            data-dux="dialog-open"
                            data-url="{url('order/Order/close', ['order_id' => $info.order_id])}" data-title="取消订单"
                            data-height="365px">
                        <!--{else}-->
                        <button class="am-btn am-btn-primary" disabled>
                            <!--{/if}-->
                            取消订单
                        </button>
    </div>
</div>

<div class="am-g">
    <div class="am-u-lg-3 am-u-md-6 am-u-sm-12">
        <div class="am-panel dux-stat-widget">
            <div class="am-panel-bd">
                <i class="media-icon am-icon-btn blue am-icon-money"></i>
                <div class="media-body">
                    <h1 class="title">{$info.total_price}</h1>
                    <p class="grey-text">订单总额</p>
                </div>
            </div>
        </div>
    </div>
    <div class="am-u-lg-3 am-u-md-6 am-u-sm-12">
        <div class="am-panel dux-stat-widget">
            <div class="am-panel-bd">
                <i class="media-icon am-icon-btn red am-icon-user"></i>
                <div class="media-body">
                    <h1 class="title">{$info.show_name}</h1>
                    <p class="grey-text">订单用户</p>
                </div>
            </div>
        </div>
    </div>

    <div class="am-u-lg-3 am-u-md-6 am-u-sm-12">
        <div class="am-panel dux-stat-widget">
            <div class="am-panel-bd">
                <i class="media-icon am-icon-btn blue am-icon-users"></i>
                <div class="media-body">
                    <h1 class="title"><a href="{$info.order_seller_url}" target="_blank">{$info.order_seller_name}</a></h1>
                    <p class="grey-text">订单卖家</p>
                </div>
            </div>
        </div>
    </div>
    <div class="am-u-lg-3 am-u-md-6 am-u-sm-12">
        <div class="am-panel dux-stat-widget">
            <div class="am-panel-bd">
                <i class="media-icon am-icon-btn green am-icon-print"></i>
                <div class="media-body">
                    <h1 class="title">{$info.status_data.name}</h1>
                    <p class="grey-text">订单状态</p>
                </div>
            </div>
        </div>

    </div>
</div>

<div class="dux-body">
    <table class="am-table dux-table">
        <thead>
        <tr>
            <th colspan="2">商品</th>
            <th width="150">数量</th>
            <th width="150">小计</th>
        </tr>
        </thead>
        <tbody>
        <!--loop{$orderGoods as $vo}-->
        <tr>
            <td width="90">
                <a href="{$vo.goods_url}" target="_blank">
                <img src="{$vo.goods_image}" alt="" width="80" height="80">
                </a>
            </td>
            <td>
                <a target="_blank" href="{$vo.goods_url}">{$vo.goods_name}</a>
                <div>
                    重量:{$vo.weight/1000}kg
                    <!--if{!empty($vo.goods_options)}-->
                    <!--loop{$vo.goods_options as $v}-->
                    {$v.name}:{$v.value}
                    <!--{/loop}-->
                    <!--{/if}-->
                </div>
            </td>
            <td>{$vo.goods_qty}</td>
            <td class="am-text-danger">￥{$vo.price_total}</td>
        </tr>
        <!--{/loop}-->
        </tbody>
    </table>
</div>
<br>
<div class="dux-body">
    <table class="am-table dux-table">
        <thead>
            <tr>
                <th width="200">快递</th>
                <th>单号</th>
                <th>时间</th>
                <th>备注</th>
            </tr>
        </thead>
        <tbody>
        <!--if{!empty($deliveryList)}-->
        <!--loop{$deliveryList as $vo}-->
        <tr>
            <td>{$vo.delivery_name}</td>
            <td>{$vo.delivery_no}</td>
            <td>{date('Y-m-d H:i:s', $vo.delivery_create_time)}</td>
            <td>{$vo.remark ? $vo.remark : '无'}</td>
        </tr>
        <!--{/loop}-->
        <!--{else}-->
        <tr>
            <td colspan="4">
                暂未发货
            </td>
        </tr>
        <!--{/if}-->
        </tbody>
    </table>
</div>
<br>
<div class="am-g">
    <div class="am-u-lg-6 am-u-md-6 am-u-sm-12">
        <table class="am-table dux-table">
            <thead>
            <tr>
                <th colspan="2">订单信息</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>订单号: {$info.order_no}</td>
                <td>会员账号:
                    <a data-dux="dialog-open"
                       data-url="{url('member/MemberUser/dialogUser', ['id' => $info.order_user_id])}" data-title="用户信息"
                       data-height="250px" href="javascript:;">{$info.user_nickname}({$info.user_email})</a>
                </td>
            </tr>
            <tr>
                <td>下单时间: {date('Y-m-d H:i:s', $info.order_create_time)}</td>
                <td>发货状态: {$info.delivery_status ? '已发货' : '未发货'}</td>
            </tr>
            <tr>
                <td>完成时间: {$info.order_complete_time ? date('Y-m-d H:i:s', $info.order_complete_time) : '未完成'}</td>
                <td>付款方式: {$info.pay_type ? '线上支付' : '线下支付'}</td>
            </tr>
            <tr>
                <td colspan="2">订单总额: <span class="am-text-danger"> {$info.total_price}元 </span> (含{$info.delivery_price}运费)
                </td>
            </tr>
            <tr>
                <td colspan="2">订单备注: {$info.order_remark ? $info.order_remark : '无'}</td>
            </tr>
            </tbody>
        </table>
        <br>
        <table class="am-table dux-table">
            <thead>
            <tr>
                <th colspan="2">收货信息</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td>收货姓名: {$info.receive_name}</td>
                <td>收货电话: {$info.receive_tel}</td>
            </tr>
            <tr>
                <td>邮政编码: {$info.receive_zip}</td>
                <td>收货地区: {$info.receive_province} {$info.receive_city} {$info.receive_region}</td>
            </tr>
            <tr>
                <td colspan="2">收货地址: {$info.receive_address}</td>
            </tr>
            </tbody>
        </table>
        <br>
        <table class="am-table dux-table">
            <thead>
            <tr>
                <th colspan="2">支付信息</th>
            </tr>
            </thead>
            <tbody>
            <!--if{!empty($payInfo)}-->
            <tr>
                <td>流水号: {$payInfo.log_no}</td>
                <td>支付时间: {date('Y-m-d H:i:s', $payInfo.time)}</td>
            </tr>
            <tr>
                <td>支付方式: {$payInfo.pay_name}</td>
                <td>支付号: {$payInfo.pay_no}</td>
            </tr>
            <tr>
                <td>支付备注: {$payInfo.remark ? $payInfo.remark : '无'}</td>
                <td>支付金额: {$payInfo.money}</td>
            </tr>
            <!--{else}-->
            <tr>
                <td colspan="2">
                    <!--if{$info.pay_type}-->
                    暂未进行支付
                    <!--{else}-->
                    货到付款
                    <!--{/if}-->
                </td>
            </tr>
            <!--{/if}-->
            </tbody>
        </table>

    </div>
    <div class="am-u-lg-6 am-u-md-6 am-u-sm-12">
        <table class="am-table dux-table">
            <thead>
                <tr>
                    <th width="200">时间</th>
                    <th>消息</th>
                    <th>备注</th>
                </tr>
            </thead>
            <tbody>
            <!--loop{$logList as $vo}-->
            <tr class="{$vo.type ? '' : 'am-text-danger'}">
                <td>
                    {date('Y-m-d H:i:s', $vo.time)}
                </td>
                <td>
                    {$vo.msg}
                </td>
                <td>{$vo.remark}</td>
            </tr>
            <!--{/loop}-->
            </tbody>
        </table>
    </div>
</div>